package com.chagee.store.operation.server.event.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chagee.store.operation.server.entity.TaskExecutionDO;
import com.chagee.store.operation.server.model.param.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface TaskExecutionMapper extends BaseMapper<TaskExecutionDO> {

	Page<TaskExecutionDO> waitTaskList(Page<TaskExecutionDO> page, @Param("query") StoreAppSweepQueryParam queryParameter);
	Page<TaskExecutionDO> selectPage(Page<TaskExecutionDO> page, @Param("query") StoreAppSweepQueryParam queryParameter);

	/**
	 * 根据工单编码获取关联的任务信息
	 *
	 * @param workOrderNumber 工单编码
	 * @return list
	 */
	List<TaskExecutionDO> selectByWorkOrderNumber(@Param("workOrderNumber") String workOrderNumber);

	/**
	 * 获取该门店下该任务昨日的验收结果（满意/不满意/无此项）
	 *
	 * @param getTaskRequest 入参
	 * @return 结果
	 */
	List<TaskExecutionDO> getTaskExecutionEarlyAcceptance(@Param("getTaskRequest") GetTaskRequest getTaskRequest);

	Page<TaskExecutionDO> waitTask(Page<TaskExecutionDO> page, @Param("query") OrderTaskListParam queryParameter);

	Page<TaskExecutionDO> selectAlready(Page<TaskExecutionDO> page, @Param("query") OrderTaskListParam queryParameter);
}
